<?php if (isset($_SERVER['HTTP_USER_AGENT']) && !strpos($_SERVER['HTTP_USER_AGENT'], 'MSIE 6')) echo '<?xml version="1.0" encoding="UTF-8"?>'. "\n"; ?>
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml" dir="<?php echo $direction; ?>" lang="<?php echo $lang; ?>" xml:lang="<?php echo $lang; ?>">
<head>
<title><?php echo $title; ?></title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<base href="<?php echo $base; ?>" />
<?php if ($description) { ?>
<meta name="description" content="<?php echo $description; ?>" />
<?php } ?>
<?php if ($keywords) { ?>
<meta name="keywords" content="<?php echo $keywords; ?>" />
<?php } ?>
<?php if ($icon) { ?>
<link href="<?php echo $icon; ?>" rel="icon" />
<?php } ?>
<?php foreach ($links as $link) { ?>
<link href="<?php echo $link['href']; ?>" rel="<?php echo $link['rel']; ?>" />
<?php } ?>
<link href="catalog/view/theme/ninghao/stylesheet/stylesheet.css" rel="stylesheet" >
<?php foreach ($styles as $style) { ?>
<link rel="<?php echo $style['rel']; ?>" href="<?php echo $style['href']; ?>" media="<?php echo $style['media']; ?>">
<?php } ?>
<script src="catalog/view/javascript/jquery/jquery-1.7.1.min.js"></script>
<script src="catalog/view/javascript/jquery/ui/jquery-ui-1.8.16.custom.min.js"></script>
<link rel="stylesheet" type="text/css" href="catalog/view/javascript/jquery/ui/themes/ui-lightness/jquery-ui-1.8.16.custom.css" />
<script src="catalog/view/javascript/jquery/ui/external/jquery.cookie.js"></script>
<script src="catalog/view/javascript/jquery/colorbox/jquery.colorbox.js"></script>
<link rel="stylesheet" type="text/css" href="catalog/view/javascript/jquery/colorbox/colorbox.css" media="screen" />
<script src="catalog/view/theme/ninghao/js/common.js"></script>
<?php foreach ($scripts as $script) { ?>
<script src="<?php echo $script; ?>"></script>
<?php } ?>
<!--[if IE 7]>
<link rel="stylesheet" href="catalog/view/theme/ninghao/stylesheet/ie7.css">
<![endif]-->
<!--[if lt IE 7]>
<link rel="stylesheet" href="catalog/view/theme/ninghao/stylesheet/ie6.css">
<script src="catalog/view/javascript/DD_belatedPNG_0.0.8a-min.js"></script>
<script type="text/javascript">
DD_belatedPNG.fix('#logo img');
</script>
<![endif]-->
<link rel="stylesheet" href="catalog/view/theme/ninghao/stylesheet/bootstrap.css">
<link rel="stylesheet" href="catalog/view/theme/ninghao/stylesheet/style.css">
<script type="text/javascript" src="catalog/view/theme/ninghao/js/bootstrap.min.js"></script>
<script src="catalog/view/theme/ninghao/js/bootstrap.js"></script>
<script src="catalog/view/theme/ninghao/js/bootstrap-dropdown.js"></script>
<script src="catalog/view/theme/ninghao/js/bootstrap-button.js"></script>
<script src="catalog/view/theme/ninghao/js/bootstrap-tab.js"></script>
<script src="catalog/view/theme/ninghao/js/bootstrap-tooltip.js"></script>
<script src="catalog/view/theme/ninghao/js/application.js"></script>
<?php echo $google_analytics; ?>
</head>
<body>

<div class="navbar navbar-fixed-top">
  <div class="navbar-inner">
    <div class="container"> <a class="btn btn-navbar" data-toggle="collapse" data-target=".nav-collapse"> <span class="icon-bar"></span> <span class="icon-bar"></span> <span class="icon-bar"></span> </a>
      <div class="nav-collapse"> 
        <!-- 工具菜单开始 -->
        <ul class="nav">
          <li class="welcome_message">
            <?php if (!$logged) { ?>
            <?php echo $text_welcome; ?>
            <?php } else { ?>
            <?php echo $text_logged; ?>
            <?php } ?>
          </li>
          <li class="divider-vertical"></li>
          <li><a href="<?php echo $home; ?>"><i class="icon-white icon-home" alt="<?php echo $text_home; ?>" title="<?php echo $text_home; ?>"></i></a></li>
          <li><a href="<?php echo $wishlist; ?>" id="wishlist-total"><?php echo $text_wishlist; ?></a></li>
          <li> <a href="<?php echo $account; ?>"><?php echo $text_account; ?></a></li>
          <li><a href="<?php echo $shopping_cart; ?>"><?php echo $text_shopping_cart; ?></a></li>
          <li> <a href="<?php echo $checkout; ?>"><?php echo $text_checkout; ?></a></li>
          <li class="divider-vertical"></li>
        </ul>
        <!-- 工具菜单结束 --> 
        
        <!-- 选择语言开始 -->
        <div class="pull-left"> <?php echo $language; ?> </div>
        <!-- 选择语言结束 -->
        
        <!-- 购物车开始 -->
        <div id="shopping-cart-top" class="span3 pull-right"> 
	        <?php echo $cart; ?> 
        </div>
          <!-- 购物车结束 --> 
      </div>
    </div>
  </div>
</div>
<div id="header">
  <div class="container">
    <div class="row">  
      <!-- 标志开始 -->
      <?php if ($logo) { ?>
      <div class="logo span2"><a href="<?php echo $home; ?>"><img src="<?php echo $logo; ?>" title="<?php echo $name; ?>" alt="<?php echo $name; ?>" /></a></div>
      <?php } ?>
      <!-- 标志结束 --> 
      
      <!-- 导航菜单开始 -->
      <?php if ($categories) { ?>
      <div class="span5">
        <div id="navigation" class="btn-group ">
          <ul class="nav nav-pills">
            <?php foreach ($categories as $category) { ?>
            <li class="dropdown"><a style="float:left" href="<?php echo $category['href']; ?>"><?php echo $category['name']; ?></a>
              <?php if ($category['children']) { ?>
              <a class="btn dropdown-toggle" data-toggle="dropdown" style="float:left;"> <span class="caret"></span> </a>
              <?php for ($i = 0; $i < count($category['children']);) { ?>
              <ul  class="dropdown-menu">
                <?php $j = $i + ceil(count($category['children']) / $category['column']); ?>
                <?php for (; $i < $j; $i++) { ?>
                <?php if (isset($category['children'][$i])) { ?>
                <li><a href="<?php echo $category['children'][$i]['href']; ?>"><?php echo $category['children'][$i]['name']; ?></a></li>
                <?php } ?>
                <?php } ?>
              </ul>
              <?php } ?>
              <?php } ?>
            </li>
            <?php } ?>
          </ul>
        </div>
      </div>
      <?php } ?>
      
      <!-- 导航菜单结束 --> 
      
      <!-- 货币选择开始 -->
      <div class="span2"><?php echo $currency; ?></div>
      <!-- 货币选择结束 --> 
      
      <!-- 搜索开始 -->
      <div class="span3 pull-right" style="text-align:right">
        <div class="input-append ">
          <?php if ($filter_name) { ?>
          <input class="search-query  span2" type="text" name="filter_name" value="<?php echo $filter_name; ?>" /><div class="button-search btn"><i class="icon-search"></i></div>
          <?php } else { ?>
          <input class="search-query  span2" type="text" name="filter_name" placeholder="<?php echo $text_search; ?>"  /><div class="button-search btn"><i class="icon-search"></i></div>
          <?php } ?>
        </div>
      </div>     
      <!-- 搜索结束 --> 
    </div>
  </div>
</div>
<div class="container">
<div id="notification"></div>
